home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group93c.txt
/
000016_icon-group-sender _Mon Jul 19 21:24:57 1993.msg
< prev
next >
Wrap
Internet Message Format
|
1994-02-02
|
1KB
Received: by cheltenham.cs.arizona.edu; Tue, 20 Jul 1993 19:43:51 MST
Date: 19 Jul 93 21:24:57 GMT
From: walter!flaubert!norman@uunet.uu.net (Norman Ramsey)
Organization: Bellcore
Subject: More on Icon performance
Message-Id: <1993Jul19.212457.15962@walter.bellcore.com>
Sender: icon-group-request@cs.arizona.edu
To: icon-group@cs.arizona.edu
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
I want to create dags, so that I need to check to see if the node I'm
about to create already exists. The best way I know of is to create a
string that is a function of the node's elements, then look for that
string in a table. Does anyone else know a better way?
Here's what I'm doing:
procedure newitem(nt, dotpos, cat)
static cache
initial { cache := table() }
s := nt || " " || image(cat) || " " || dotpos
/cache[s] := item(nt, dotpos, cat)
return cache[s]
end
Can anyone suggest something better? I'm especially interested in
something less wasteful of string space.
Norman
--
Norman Ramsey
norman@bellcore.com